<template>
	<div class="flex flex-row space-x-2 w-full">
		<el-button class="flex-1" type="primary" @click="$emit('saveData')">
			<el-icon class="mr-1"><Document /></el-icon>保存模板
		</el-button>
		<el-button class="flex-1" type="warning" @click="$emit('clearAll')">
			<el-icon class="mr-1"><Delete /></el-icon>清空文档
		</el-button>
	</div>
</template>

<script setup lang="ts">
import { defineProps, defineEmits } from 'vue';
import { Document, Delete } from '@element-plus/icons-vue';

defineProps({
	hasDocument: Boolean,
});

defineEmits(['saveData', 'clearAll', 'generate']);
</script>
